package com.link.base.base.masterslavedbrlat.service;

import javax.annotation.Resource;

import com.link.core.util.HttpUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.link.base.base.masterslavedbrlat.dao.mybatis.mapper.MasterSlaveDbRlatMapper;
import com.link.base.base.masterslavedbrlat.model.MasterSlaveDbRlat;
import com.link.core.basic.dao.mapper.BasicMapper;
import com.link.core.basic.service.BasicServiceImpl;

/**
 * 主从数据库对应关系-用于维护主从数据库表与表之间的对应关系 
 *
 * @author 谢育强
 * @date   2019/12/05 19:59
 */
@Service
public class MasterSlaveDbRlatServiceImpl extends BasicServiceImpl<MasterSlaveDbRlat> implements MasterSlaveDbRlatService {

    @Resource
    private MasterSlaveDbRlatMapper    masterSlaveDbRlatMapper;
    
    @Override
    public BasicMapper<MasterSlaveDbRlat> getBasicMapper() {
        return masterSlaveDbRlatMapper;
    }

    @Value("${canal.refreshDbShipUrl}")
    private String refreshDbShipUrl;

    public void refreshDbShipCache() throws Exception {
        HttpUtils.sendGet(refreshDbShipUrl, "");
    }
}

